package com.hr.reactive.mono.s02;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import reactor.core.publisher.Mono;

public class LazyStream02 {
    private static final Logger log = LoggerFactory.getLogger(LazyStream02.class);

    public static void main(String[] args) {
        var mono = Mono.just(1).map(i->i/0);
        mono.subscribe(
                i -> log.info("====>{}", i),
                err->log.error("error",err),
                ()->log.info("completed"),
                su->su.request(2) //发送请求
                );
    }


}
